package com.greenova.projector.service;

import java.util.List;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.greenova.projector.dao.PersonDao;
import com.greenova.projector.entity.Person;

@Service
public class PersonServiceImpl implements PersonService {

	@Autowired
	private PersonDao personDao;
	
	@Override
	public void addPerson(Person person) {
		 personDao.addPerson(person);
	}

	@Override
	public List<Person> listAllPersons() {
		return personDao.listAllPersons();
	}

	@Override
	public Set<Person> listAllPersonsNotAssignedInProject(long projectId) {
		return personDao.listAllPersonsNotAssignedInProject(projectId);
	}

	@Override
	public Set<Person> listAllPersonsAssignedInProject(long projectId) {
		return personDao.listAllPersonsAssignedInProject(projectId);
	}

	@Override
	public Person getPersonById(long personId) {
		return personDao.getPersonById(personId);
	}

}
